//
// Created by Administrator on 24-8-10.
//

#ifndef CPPROJ_BEEP_H
#define CPPROJ_BEEP_H
#include "main.h"

class Beep {

public:
    /**
     * 构造函数
     * @param Port
     * @param pin
     */
    Beep(GPIO_TypeDef *Port,uint16_t pin);

    /**
     * 喇叭响
     */
    void BeepOn();

    /**
     * 喇叭不叫
     */
    void BeepOff();

    /**
     * 喇叭间歇行报警
     * @param delay
     */
    void BeepWarning(uint32_t delay);

private:
    //喇叭端口
    GPIO_TypeDef * BEEP_PROT;
    //喇叭pin 口
    uint16_t  BEEP_PIN;
};


#endif //CPPROJ_BEEP_H
